//
//  ViewController.m
//  TestSD
//
//  Created by shaop on 2016/11/17.
//  Copyright © 2016年 shaop. All rights reserved.
//

#import "ViewController.h"
#import "SDAutoLayout.h"
#import "CustomImageView.h"
#import <SDWebImage/UIImageView+WebCache.h>
@interface ViewController ()
@property (strong, nonatomic) IBOutlet CustomImageView *imageView;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    NSArray *imagArr = [NSArray arrayWithObjects:
                        @"http://img.biyao.com/files//temp/render_zs/result/1300220177/4007da85589649ef_130022017700934_0_800_504//img_6_800.jpg",
                        @"http://img.biyao.com/files//temp/render_zs/result/1300220177/4007da85589649ef_130022017700934_0_800_504//img_7_800.jpg",
                        @"http://img.biyao.com/files//temp/render_zs/result/1300220177/4007da85589649ef_130022017700934_0_800_504//img_0_800.jpg",
                        @"http://img.biyao.com/files//temp/render_zs/result/1300220177/4007da85589649ef_130022017700934_0_800_504//img_1_800.jpg",
                        @"http://img.biyao.com/files//temp/render_zs/result/1300220177/4007da85589649ef_130022017700934_0_800_504//img_2_800.jpg",
                        @"http://img.biyao.com/files//temp/render_zs/result/1300220177/4007da85589649ef_130022017700934_0_800_504//img_3_800.jpg",
                        @"http://img.biyao.com/files//temp/render_zs/result/1300220177/4007da85589649ef_130022017700934_0_800_504//img_4_800.jpg",
                        @"http://img.biyao.com/files//temp/render_zs/result/1300220177/4007da85589649ef_130022017700934_0_800_504//img_5_800.jpg",
                        nil];
    
    
    for (int i = 0; i < imagArr.count; i++) {
        SDWebImageManager *manager = [SDWebImageManager sharedManager];
        [manager downloadImageWithURL:imagArr[i] options:SDWebImageRetryFailed progress:^(NSInteger receivedSize, NSInteger expectedSize) {
            
        } completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) {
        }];
    }

    
    [_imageView setImageArr:imagArr];
    
    
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

@end
